home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / mg2a_src.zip / SYS / OSK / SYSDEF.H < prev    next >
C/C++ Source or Header  |  1988-08-23  |  2KB  |  54 lines

  1. /*
  2.  * Os9/68K specific definitions for micrognuemacs
  3.  */
  4. #include <stdio.h>
  5.  
  6. #define KBLOCK    1024        /* Kill grow.                */
  7. #define GOOD    0        /* Good exit status.            */
  8. #define NO_VOID_TYPE        /* void not supported yet        */
  9. #define PC PC_            /* compiler can't handle variable    */
  10. #define SR SR_            /* called PC or SR            */
  11. #define NO_RESIZE        /* terminal doesn't change size        */
  12. typedef int    RSIZE;        /* Type for file/region sizes        */
  13. typedef short    KCHAR;        /* Type for keyboard character        */
  14. #define MAXPATH 128        /* reasonable maximum path length    */
  15.  
  16.             /* malloc works best with a multiple of 8 bytes */
  17. #define MALLOCROUND(v)    ((v) += 7, (v) &= ~7)
  18.  
  19. /*
  20.  * Macros used by the buffer name making code.
  21.  * Start at the end of the file name, scan to the left
  22.  * until BDC1 (or BDC2, if defined) is reached. The buffer
  23.  * name starts just to the right of that location, and
  24.  * stops at end of string (or at the next BDC3 character,
  25.  * if defined). BDC2 and BDC3 are mainly for VMS.
  26.  */
  27. #define BDC1    '/'            /* Buffer names.        */
  28.  
  29. /*
  30.  * Needed for lots of small mallocs on os9/68k.     _memmins should be
  31.  * (maximum malloced memory)/16.  (defalt _memmins is 4096)
  32.  * Note that malloc may now fail if there isn't _memmins bytes
  33.  * contiguous free memory.  _memins could be reduced and the malloc
  34.  * tried again.     (Not currently implemented.)
  35.  */
  36. #ifdef MAXMEM
  37. #  define SYSINIT    {extern int _memmins;    _memmins=MAXMEM*64; }
  38. #else
  39. #  define SYSINIT    {extern int _memmins;    _memmins=32768; }
  40. #endif
  41.  
  42. /* see "caveates" in the osk C manual on _strass */
  43. #define bcopy(from,to,len)    _strass(to,from,len)
  44.  
  45. /* see comments on these in display.c.    OSK can't stand the wasted memory
  46.  * without making the score array "remote", which generates lousy code.
  47.  * Besides, I don't have an extra 100kb of memory for the score array.
  48.  */
  49. #define XCHAR    char
  50. #define XSHORT    short
  51.  
  52. char    *getenv();
  53. #define gettermtype()    getenv("TERM")    /* get terminal type        */
  54.